<?php
namespace app\common\validate;

use think\Validate;

class CheckClockValidate extends Validate
{
    protected $rule =   [
        'clock_wifi|打卡WIFI'     => 'require|length:1,50',
        'bssid|BSSID'             => 'require|length:1,100',
        'clock_address|打卡地址'  => 'require|length:1,100',
        'clock_img|图片'          => 'require',
        'remarks|备注'            => 'require|length:1,100',
        'days|日期'               => 'require|date',
    ];
    
    protected $scene = [
        /** 小程序 */
        'add'        => ['clock_wifi', 'bssid', 'clock_address'],
        'add_out'    => ['clock_address', 'clock_img', 'remarks'],
        'check_data' => ['days'],
    ];
}